<?php
    defined( '_VALID_MOS' ) or die( include("404.php"));
    $xtpl = new XTemplate('productlist.html');
    $sql = 'SELECT * FROM product ORDER BY count';
    $query = mysql_query($sql);
    if($rows = msql_num_rows($query)==0){
        echo 'Data not found';
    }
    else{
        $xtpl->assign('prod_list',$rows);
        $xtpl->parse('product_list');
    }
    $xtpl->out('product_list');
?>